<template>
    <div class="border-b border-r goodItem" @click="goDetail(good.tao_id)">
        <van-image
        :src="good.pict_url"
        width="128"
        height="128"
        position="center"
        fit="cover"
        />
        <div>
            <span class="van-multi-ellipsis--l2">{{good.title}}</span>
        </div>
        <div class="text-green ftn16">￥ {{good.quanhou_jiage}}</div>
    </div>
    
</template>
<script lang="ts">
import { defineComponent,reactive } from "vue";
import type { INineList } from "@/plugins/utils";
import type {PropType} from "vue"
import {useRouter} from 'vue-router'
export default defineComponent({
    props: {
        item: {
            type: Object as PropType<INineList>,
            required: true
        }
    },
    setup(props: any) {
        let {item} = props;
        const router = useRouter();
        const good:INineList  = reactive(item)
        const goDetail = (tao_id: string) => {
            router.push({name: 'good',  params: { id: tao_id}});
        }
        return {
            good,
            goDetail
        }
    }
})
</script>